﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Telerik.Windows.Controls;
using Accounting.Library;

namespace csla4Skeleton.UI.SL.NghiepVu.MuaSanPham.MSP_MuaHangHoa
{
    public class IsBookedStyle: StyleSelector
    {
        public override Style SelectStyle(object item, DependencyObject container)
        {
            if (item is MSP_MuaHangHoaInfo)
            {
                MSP_MuaHangHoaInfo MuaHangHoaInfo = item as MSP_MuaHangHoaInfo;
                if (!MuaHangHoaInfo.DaGhiSo)
                {
                    return RedBackgroundStyle;
                }
                else
                {
                    return WhiteBackgroundStyle;
                }
            }
            return null;
        }
        public Style RedBackgroundStyle { get; set; }
        public Style WhiteBackgroundStyle { get; set; }
    }
}
